scrolledwindow: Cancel overshoot on dimension changes
authorAlexander Mikhaylenko <alexm@gnome.org>
Mon, 15 Mar 2021 12:17:01 +0000 (17:17 +0500)
committerAlexander Mikhaylenko <alexm@gnome.org>
Thu, 1 Apr 2021 11:37:30 +0000 (16:37 +0500)
commitd7a5dedd4f5e283e21abdf9cddee3100ff91221c
treea5379d6e4ade3edc756fa30d82e98437d9e07569
parent65a061f3c29af93339f432e0e83dd7ac92e48c16
scrolledwindow: Cancel overshoot on dimension changes

If we scroll down in a list that's still being filled, we hit the edge and
initiate overshoot, and then the adjustment's upper value increases. This
leads to an unwanted bounce back.

Additionally, if in a similar situation the upper value decreases, the
overscroll glow gets stuck.

Update kinetic scrolling upper and lower value on changes, and immediately
cancel it if dimensions on that side change.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3752
gtk/gtkkineticscrolling.c
gtk/gtkkineticscrollingprivate.h
gtk/gtkscrolledwindow.c